package com.onlyMe.config
{
	import com.onlyMe.config.combinations.CombinationsNode;
	import com.onlyMe.config.objects.ObjectsNode;
	import com.onlyMe.config.settings.SettingsNode;
	import com.onlyMe.config.tiles.TilesNode;

	public final class ConfigNode extends BaseNode
	{
		private var _settings:SettingsNode;
		private var _tiles:TilesNode;
		private var _objects:ObjectsNode;
		private var _combinations:CombinationsNode;
		
		public function ConfigNode()
		{
		}
		
		override protected function extract(node:XML):void
		{
			_settings = new SettingsNode().decode(node.settings[0]);
			_tiles = new TilesNode().decode(node.tiles[0]);
			_objects = new ObjectsNode().decode(node.objects[0]);
			_combinations = new CombinationsNode().decode(node.combinations[0]);
		}

		public function get settings():SettingsNode
		{
			return _settings;
		}

		public function get tiles():TilesNode
		{
			return _tiles;
		}

		public function get objects():ObjectsNode
		{
			return _objects;
		}

		public function get combinations():CombinationsNode
		{
			return _combinations;
		}


	}
}